package composite


type tMockUser struct {
	iID int
	sName string
}

func NewMockUser(id int, name string) IUser {
	return &tMockUser{
		id, name,
	}
}

func (me *tMockUser) ID() int {
	return me.iID
}

func (me *tMockUser) Name() string {
	return me.sName
}

func (me *tMockUser) Learn(course ICourse) {
	course.SetUser(me)

	for {
		state := course.Learn()
		if state == DONE {
			break
		}
	}
}